package com.czxy.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

//明确这个类是配置类
@Configuration
//明确要扫描的controller包
@ComponentScan({"com.czxy.controller"})
@EnableWebMvc  // 支持字符串日期自动转换成Date日期 , 支持文件上传
public class SpringMVCConfig  extends WebMvcConfigurerAdapter {



//    // 添加视图解析器
//    @Bean
//    public InternalResourceViewResolver viewResolver(){
//        InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
//        viewResolver.setPrefix("/user/");
//        viewResolver.setSuffix(".jsp");
//        return viewResolver;
//    }





}
